home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Guided Tour of Multimedia (Second Edition)
/
The Guided Tour of Multimedia (Second Edition).iso
/
trials
/
ulead
/
browser
/
install.txt
< prev
next >
Wrap
Text File
|
1994-06-10
|
15KB
|
509 lines
//******************************************************************//
//* Ulead Browser 2.0 Installation Script *//
//* *//
//* INSTALL.EXE, INSTALL.INF, and ULINST.DLL is required for this *//
//* script to execute. *//
//* 1. Vincent Chen, 06/07/94. *//
//******************************************************************//
//* No need to SET KEY because we don't do serial number checking *//
//* for this product. *//
//* Set the position of the installation window at the middle. *//
//* This is required by the 2.0 version of INSTALL.EXE that we used. *//
//* (The 1.84 version of INSTALL.EXE will set this as default.) *//
SET WINDOWS POS5
//* Installer Frame Definition *//
TITLE "Ulead Browser Installation"
//* No logo bitmap is required in 2.0 version INSTALL.EXE *//
//* so we skip it. *//
//* Define the product name *//
PRODNAME="Ulead Browser 2.0"
//******** Initialize the global variables *********//
//* Target directory *//
TARGETDIR="C:\BROWSER2\"
//* ULEAD2 directory *//
FIO2DIR="ULEAD2\"
//* ULEAD.INI location *//
ULprofile=WINDIR+"ULEAD.INI"
//* ULEAD.DAT directory location *//
ULDIR=WINDIR+"ULEAD.DAT\"
//* Set up default font used *//
SELECT STYLE PARA3
SELECT FONT "Helv" 16
//* File locations and their layout declaration *//
GOSUB FileDeclare
//******************** Main installation starts here ********************//
MAIN:
//* This line is required by the installer program *//
EDIT SELFNAME OF "path" IN ULprofile UNDER "installer"
//* Show welcome screen *//
GOSUB Welcome
//* Ask the target directory to copy the programs to *//
AskDir:
title_="Select Target Directory"
GOSUB ShowTitle
DISPLAY "Enter the directory where you want to install the `cb" PRODNAME
\ "`ck programs.`n`n"
INQUIRE STRING INTO TARGETDIR AS DIRECTORY NONULL
PAUSE OK
CLEAR
//* Make it upper case *//
TARGETDIR = STRUPR TARGETDIR
//* Select the items to be installed here. We don't have options for *//
//* users to choose, so it just set the total size to be copied and *//
//* check the space is enough or not. *//
MainSel:
resel="2"
copyexe="10"
//* Total Program and Filter Size in HD *//
size#=3150
//* Check if the BROWSER.EXE is already there. *//
//* If yes, see if user want to overwrite it. *//
GOSUB CheckExist
//* If user want to select another directory, go back to ask directory. *//
IF ITEM 2 OF copyexe THEN AskDir
//* Check the space in the target directory. *//
//* If enough, go to space_enough to install. *//
IF DISK TARGETDIR HAS size# THEN spc_enough
//* Otherwise, show warning message to user about space is not enough. *//
GOSUB Warn
DISPLAY "`nThere is insufficient space in " TARGETDIR " to install the selected items
\ (`cr" size# " K`ck required). Please select another drive and click OK to continue.`n`n"
//* Then, ask user to select another disk drive. *//
SHOW DISKSPACE INTO r1 size# "Not enough space to continue."
PAUSE OK
CLEAR
//* Select another disk drive by changing the disk drive of the target *//
//* directory. *//
TARGETDIR=STRNCPY r1 FIRST 2
TARGETDIR=TARGETDIR+"BROWSER2\"
GOTO AskDir
//* Target directory has enough space *//
spc_enough:
//* Set the total size of files to be copied to the progress indicator *//
//* variable. This will allow the progress indicator to show from *//
//* 0% to 100% in one run. *//
TOTALSIZE#=size#
//* Create target directory *//
MKDIR TARGETDIR
//* Ask if user want to create program group and icons *//
GOSUB AskIcon
//* Place the ULEAD2 directory at the same level as the target directory *//
insaux=STARTDIR+"ULINST.DLL"
func="uliGetOneLevelUp"
old=TARGETDIR
new=""
yesno=""
CALL func IN insaux WITH old new yesno
//* Assign the ULEAD2 directory *//
IF yesno=="Y"
FIO2DIR = new+FIO2DIR
ELSE
FIO2DIR = TARGETDIR+FIO2DIR
ENDIF
//* Create the ULEAD2 directory *//
MKDIR FIO2DIR
//* Clear the whole screen *//
CLEAR ALL
//* Show the text screen 0 *//
GOSUB CopySub0
//* Copy the programs directly to target directory. *//
COPY EXE TO TARGETDIR
//* Show the text screen 1 *//
GOSUB CopySub1
//* Copy the filters directly to ULEAD2 directory. Original script is *//
//* to copy them to target directory first, then compare them with the *//
//* existing ones at ULEAD2 directory. Then, copy the newer ones to *//
//* ULEAD2 directory if they're newer. *//
//* (We don't do the upgrading in this product to simplify the script) *//
COPY FIO2 TO FIO2DIR
//* Edit the FIO2PATH and MIOPATH in ULEAD.INI if there are none. *//
GOSUB EditFIO2PATH
//* Create Album ToolBox group file in ULEAD.DAT directory. *//
GOSUB EditGroupSection
//* Tell installer that installation is complete *//
COMPLETE
//* Create the program icons if user said so. *//
IF icon_sel != ""
GOSUB CreateIcon
ENDIF
//* Can't exit from installation now because all are done. *//
ESCAPE OFF
//* Clear the whole screen. *//
CLEAR ALL
//* Tell user the installation is complete *//
title_="Installation Complete"
GOSUB ShowTitle
DISPLAY "You have successfully installed `cb" PRODNAME "`ck.`n"
PAUSE OK
CLEAR
//* Delete the files used in installation here. Because we don't use *//
//* any bitmaps or supporting files in this script, we do nothing. *//
Over:
//* Bye bye. *//
EXIT
//************************* End of Installation ***********************//
//* Set or edit the [Library] section for FIO2PATH and MIOPATH *//
EditFIO2PATH:
//* Edit [library section] to give FIO2PATH if it doesn't exist *//
GET STRING "FIO2PATH" IN ULprofile "library" "" 120 INTO r1
IF r1==""
r1=FIO2DIR
EDIT r1 OF "FIO2PATH" IN ULprofile UNDER "library"
ENDIF
//* Edit [library section] to give MIOPATH if it doesn't exist *//
GET STRING "MIOPATH" IN ULprofile "library" "" 120 INTO r1
IF r1==""
r1=FIO2DIR
EDIT r1 OF "MIOPATH" IN ULprofile UNDER "library"
ENDIF
//* Give the default values of Photo CD resolution and image type *//
GET STRING "Resolution" IN ULprofile "PhotoCD" "" 120 INTO r1
IF r1==""
r1="2"
EDIT r1 OF "Resolution" IN ULprofile UNDER "PhotoCD"
ENDIF
GET STRING "ImageType" IN ULprofile "PhotoCD" "" 120 INTO r1
IF r1==""
r1="2"
EDIT r1 OF "ImageType" IN ULprofile UNDER "PhotoCD"
ENDIF
RETURN
//* Create or add to Album's toolbar group file in ULEAD.DAT directory *//
EditGroupSection:
//* Create ULEAD.DAT directory in case it doesn't exist *//
MKDIR ULDIR
IF LASTRESULT=="F" THEN ULDIR = TARGETDIR
//* Create group file in WINDOWS\ULEAD.DAT directory for ToolBox *//
gname = ULDIR+"BROWSER2.GRP"
grpname="Browser 2"
secname="Groups"
yesno=""
//* create it *//
insaux=STARTDIR+"ULINST.DLL"
func="uliCreateGroupFile"
CALL func IN insaux WITH gname grpname yesno
//* Add the program icon into the newly created group *//
func="uliAddProgramIcon"
//* Viewer *//
pgmname=TARGETDIR+"VIEWER.EXE"
CALL func IN insaux WITH gname pgmname yesno
//* Also record the data into ULEAD.INI *//
func="uliInsertGroupToIni"
CALL func IN insaux WITH gname ULprofile secname yesno
RETURN
//* Welcome Screen *//
Welcome:
//* Welcome Screen *//
title_="Welcome to "+PRODNAME+""
GOSUB ShowTitle
DISPLAY "Browse and retrieve all the files on your system, be they image,
\ graphics, animation, video, sound and text!`n`n
\ You can execute the BROWSER.EXE program directly from the CD-ROM or
\ install the " PRODNAME " programs to your hard disk for easier and faster operations.
\ `n`nThis program can install the " PRODNAME " programs
\ and create their program icons for you.
\ Click on the OK button to continue. Click on the Exit button to exit."
PAUSE OK
RETURN
//* Text screen 0 *//
CopySub0:
title_= ""+PRODNAME+" Online Help"
GOSUB ShowTitle
DISPLAY "`cb" PRODNAME "`ck's extensive on-line Help is always at hand.
\ Simply press F1 to instantly open Help at the topic describing the feature your
\ mouse is resting on. Use the Help menu to browse or search for specific topics,
\ or to find out more about other products in the Ulead range."
RETURN
//* Text screen 1 *//
CopySub1:
title_= PRODNAME
GOSUB ShowTitle
DISPLAY "`cbBrowser`ck organizes the files in your system by representing them as
\ thumbnails. These thumbnails are then grouped together and placed into convenient
\ and easy-to-use albums. You can then use powerful cataloging features to search, sort,
\ mark and slide show your files, either for presentations, or as your own personalized
\ screen saver."
RETURN
ShowTitle:
CLEAR
SELECT STYLE PARA1
SELECT FONT "Helv" 20
title1="`n`cb"+title_+"`ck`n`n"
DISPLAY title1
SELECT STYLE PARA3
SELECT FONT "Helv" 16
RETURN
Wait:
title_="`n`n`n`nOne moment, please..."
GOSUB ShowTitle
DISPLAY NOW
RETURN
Warn:
CLEAR
NOTIFY WITH BEEP
NOTIFY WITH ICON EXCLAMATION
RETURN
CheckExist:
albumexe=TARGETDIR+"BROWSER.EXE"
IF FILE albumexe EXIST
GOSUB Warn
DISPLAY "`nA version of `cb" PRODNAME "`ck already exists.`n
\ Select the action you want to perform.`n`n"
r1="&Overwrite with this version"
r2="&Select another directory for Browser installation"
INQUIRE SELECTION RADIOBUTTON WITH r1 r2 INTO copyexe
PAUSE OK
CLEAR
IF ITEM 1 OF copyexe
//* Want to overwrite *//
GOSUB DelExist
ENDIF
IF ITEM 2 OF copyexe
//* want to select another directory *//
resel="1"
TARGETDIR=
workdir=
ENDIF
ENDIF
RETURN
//* Delete the existing files in the target directory *//
DelExist:
GOSUB Wait
DELF SECTION TARGETDIR
FILE "BROWSER.EXE"
FILE "VIEWER.EXE"
FILE "GLOSS.HLP"
FILE "PRODUCTS.HLP"
FILE "ALBUM.HLP"
FILE "VIEWER.HLP"
//* Common Suppporting Files *//
FILE "UBROWSE.DLL"
FILE "UFIDO.DLL"
FILE "ULCONFIG.DLL"
FILE "ULCONVRT.DLL"
FILE "ULKERNEL.DLL"
FILE "ULPRINT.DLL"
FILE "ULUI.DLL"
FILE "UMISC.DLL"
ENDSEC
DELETE DELF
RETURN
//* Ask users if they want to create program icons (and program group) *//
AskIcon:
icon_sel=""
title_="Creating Program Icons"
GOSUB ShowTitle
DISPLAY "Select a program group for the `cb" PRODNAME "`ck program icons.
\ If you do not want to create new pro`-gram icons, click Skip.`n"
INQUIRE SELECTION LISTBOX WITH GROUPS "Ulead Browser 2.0" INTO icon_sel
PAUSE TWOBUTTON "OK" "&Skip" INTO yesno
CLEAR
IF yesno=="2"
icon_sel=""
ENDIF
RETURN
//* Create the program icons (and group) *//
CreateIcon:
//* Create Program Group *//
IF icon_sel == "Ulead Browser 2.0"
NEW GROUP icon_sel
IF LASTRESULT=="F"
//* Can't create program group.
GOSUB Warn
DISPLAY "`nWindows Program Manager cannot create the program
\ group `b`cb" icon_sel "`ck`b. It may already exist or you have reached the maximum
\ number of program groups allowed. In the later case, exit the installation program
\ and free up additional groups by removing groups you no longer need. Once completed,
\ re-run the installation program."
PAUSE OK
CLEAR
ENDIF
ELSE
//* It's an existing program group, therefore, *//
//* we don't check the creation operation is OK or not. *//
NEW GROUP icon_sel
ENDIF
//* Create Program Icons *//
title_=TARGETDIR+"BROWSER.EXE"
NEW ITEM title_ AS "Browser"
title_=TARGETDIR+"VIEWER.EXE"
NEW ITEM title_ AS "Viewer"
uprods = WINDIR+"WINHELP "+TARGETDIR+"PRODUCTS.HLP"
NEW ITEM uprods AS "Ulead Products" LASTONE
RETURN
//******************************************************************//
//* File declaration sections. *//
FileDeclare:
1 DISK "Browser Programs"
2 DISK "Browser File Filters"
EXE SECTION "BROWSER2\" 1850 "program files"
//* Program Files *//
FILE "ULCONFIG.DLL" 1
FILE "ULBH.CNV" 1
FILE "BROWSER.EXE" 1
FILE "BROWSER.HLP" 1
FILE "VIEWER.EXE" 1
FILE "VIEWER.HLP" 1
//* Help Files *//
FILE "GLOSS.HLP" 1
FILE "PRODUCTS.HLP" 1
//* Common Suppporting Files *//
FILE "UFIDO.DLL" 1
FILE "ULKERNEL.DLL" 1
FILE "ULPRINT.DLL" 1
FILE "UBROWSE.DLL" 1
FILE "ULCONVRT.DLL" 1
FILE "ULUI.DLL" 1
FILE "UMISC.DLL" 1
ENDSEC
FIO2 SECTION "ULEAD2\" 1300 "File Filters"
FILE "PCDLIB.DLL" 2
FILE "UF2ICI.DLL" 2
FILE "UF2CU.DLL" 2
FILE "UF2LZW.DLL" 2
FILE "FIO.HLP" 2
FILE "UF2BMP.FIO" 2
FILE "UF2CGM.FIO" 2
FILE "UF2CLP.FIO" 2
FILE "UF2CUR.FIO" 2
FILE "UF2DCS.FIO" 2
FILE "UF2DXF.FIO" 2
FILE "UF2EPS.FIO" 2
FILE "UF2GIF.FIO" 2
FILE "UF2ICO.FIO" 2
FILE "UF2IFF.FIO" 2
FILE "UF2IMG.FIO" 2
FILE "UF2JPEG.FIO" 2
FILE "UF2MAC.FIO" 2
FILE "UF2MSP.FIO" 2
FILE "UF2PCD.FIO" 2
FILE "UF2PCT.FIO" 2
FILE "UF2PCX.FIO" 2
FILE "UF2PIC.FIO" 2
FILE "UF2PSD.FIO" 2
FILE "UF2PXR.FIO" 2
FILE "UF2RAS.FIO" 2
FILE "UF2RLE.FIO" 2
FILE "UF2SCT.FIO" 2
FILE "UF2TGA.FIO" 2
FILE "UF2TIF.FIO" 2
FILE "UF2WMF.FIO" 2
FILE "UF2WPG.FIO" 2
FILE "ADFLIC.MIO" 2
FILE "AUDIO.MIO" 2
FILE "AVI.MIO" 2
FILE "MORPH.MIO" 2
FILE "VEPRJ.MIO" 2
FILE "QTIME.MIO" 2
FILE "RTF.MIO" 2
FILE "CDR.MIO" 2
//* $$ FILE "PPT.MIO" 2
//* $$ FILE "DOCDBF.MIO" 2
ENDSEC
RETURN